import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int[][] arr=new int[n][n];
        for(int i=0;i<n;i++){
            for(int j=0;j<=i;j++){
                if(j==0||j==n-1){
                    arr[i][j]=1;
                }else{
                    arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
                }
            }
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<=i;j++){
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int min=-1;
        int i=0;
        while(func(i)<num){
            min=num-func(i);
            i++;
        }
        if(min>func(i)-num){
            min=func(i)-num;
        }
        System.out.println(min);
    }
    public static int func(int cnt){
        if(cnt==0){
            return 0;
        }
        if(cnt==1){
            return 1;
        }
        int num1=0;
        int num2=1;
        for(int i=2;i<=cnt;i++){
            int tmp=num1;
            num1=num2;
            num2=tmp+num2;
        }
        return num2;
    }
}